package com.urea.system.domain.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.urea.common.annotation.Excel;
import com.urea.common.core.domain.BaseEntity;
import com.urea.system.domain.PayInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单对象 t_order
 * 
 * @author liuzd
 * @date 2023-08-01
 */
@Data
@ToString
public class OrderVo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;
    private Long orderId;

    /** 订单号 */
    @Excel(name = "订单号")
    @ApiModelProperty("订单号")
    private String orderNo;

    /** 订单状态;0已创建，1已完成，2已取消 */
    @Excel(name = "订单状态;0已创建，1已完成，2已取消")
    @ApiModelProperty("订单状态;0已创建，1已完成，2已取消")
    private Integer status;

    /** 支付方式;0余额支付，1微信 */
    @Excel(name = "支付方式;0余额支付，1微信")
    @ApiModelProperty("支付方式;0余额支付，1微信")
    private Integer payType;
    private String payMethod;

    /** 客户id */
    @Excel(name = "客户id")
    @ApiModelProperty("客户id")
    private Long customerId;

    /** 所属代理商 */
    @Excel(name = "所属代理商")
    @ApiModelProperty("所属代理商")
    private Long agentId;

    /** 终端id */
    @Excel(name = "终端id")
    @ApiModelProperty("终端id")
    private Long terminalId;

    /** 终端id */
    @Excel(name = "终端用户id")
    @ApiModelProperty("终端用户id")
    private Long terminalUid;

    /** 订单金额 */
    @Excel(name = "订单金额")
    @ApiModelProperty("订单金额")
    private BigDecimal amount;

    /** 支付金额 */
    @Excel(name = "支付金额")
    @ApiModelProperty("支付金额")
    private BigDecimal payAmount;

    /** 退款金额 */
    @Excel(name = "退款金额")
    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    /** 返利金额 */
    @Excel(name = "返利金额")
    @ApiModelProperty("返利金额")
    private BigDecimal rebateAmount;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("支付时间")
    private LocalDateTime payTime;

    /** 支付描述 */
    @Excel(name = "支付描述")
    @ApiModelProperty("支付描述")
    private String orderDesc;

    /** 订单明细;订单明细json */
    @Excel(name = "订单明细;订单明细json")
    @ApiModelProperty("订单明细;订单明细json")
    private String orderDetail;
    /**设备名称*/
    private String terminalName;
    /**设备编号*/
    private String terminalNo;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updatedTime;

    private PayInfo payInfo;
    // 自定义信息 json
    private String attach;
    @ApiModelProperty("总订单数")
    private Long allCount;
    @ApiModelProperty("当天订单")
    private Long dayCount;
    @ApiModelProperty("昨天订单")
    private Long yestCount;
    @ApiModelProperty("七天内订单")
    private Long sevenCount;
    @ApiModelProperty("当月订单")
    private Long monthCount;
    @ApiModelProperty("上月订单")
    private Long lastMonthCount ;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("余额")
    private String balance;
    @ApiModelProperty("用户类型")
    private String userType;
    @ApiModelProperty("代理商名称")
    private String nickName;
    @ApiModelProperty("门店名称")
    private String storeName;
    @ApiModelProperty("车队名称")
    private String fleetName;
    /** 额外信息 加注数量 */
    @Excel(name = "实际加注升数")
    @ApiModelProperty( "实际加注升数")
    private String extraInfo;
    /**可加总量*/
    @Excel(name = "可加总量")
    @ApiModelProperty( "可加总量")
    private String fillNo;


}
